<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .con{
            height: 400px;
            background-color: blue;
        }
        @media screen and (max-width: 800px){
            .con{
                background-color: red;
            }
        }
        @media screen and (max-width: 400px){
            .con{
                background-color: gray;
            }
        }
    </style>

</head>
<body>
    <div class="con">

    </div>
</body>
</html>